import string
import random
import time
s=string.ascii_uppercase
s=s+string.digits
temp=[0]*20
while True:
    for i in range(20):
        temp[i]="京·"+''.join(random.sample(s,5))
        #"京·{''.join(random.sample(s,5))}"
    print("\t可用牌号查询结果")
    for i in range(20):
        if (i)%4==0:
            print()
        print(f"{i+1}:\t{temp[i]}",end="\t")
    print()
    temp2=input("如果不满意需要重新摇号请输入：0\n如果满意请输入你要选的车牌号的序号\n请输入：")
    while temp2<'0' or temp2>'20':
        temp2=input("输入错误：请重新输入：")
    if temp2=="0":
        print("正在重新摇号")
        time.sleep(1)
        continue
    print(f"恭喜你！抢到了车牌号\"{temp[int(temp2)]}\"")
    break